home *** CD-ROM | disk | FTP | other *** search
- /* $VER: DMSelectByCmt.rexx 1.1 (2.10.98) by J. Tierney
-
- DiskMaster II Select By Comment v1.1
- 10/2/98 J. Tierney <jtierney@cyberlink-inc.com>
-
- Purpose: Select files based on their comments.
-
- Usage: REXX DMSelectByCmt.rexx [CASE]
-
- CASE - If specified, the matching is case-sensitive: "a" <> "A".
- The default is to be case-insensitive: "a" = "A".
-
- Note: To match whole words put a space on either side of the word.
- "not" will match "not", "note", "nothing", "knot", etc.
- " not " will only match " not ".
-
- Ex: REXX DMSelectByCmt.rexx - Case-insensitive matching.
- REXX DMSelectByCmt.rexx CASE - Case-sensitive matching.
- */
-
- OPTIONS RESULTS
-
- ARG ncs .
- IF ncs = 'CASE' THEN ncs = 0
- ELSE ncs = 1
-
- 'CONFIRM "Text to Match:" Okay Cancel " "'
- cmt = result
- IF ncs THEN cmt = UPPER(cmt)
-
- DIRLIST VAR dlist COMMENT
-
- DO i = 1 TO dlist.name.0
- IF ncs THEN dlist.comment.i = UPPER(dlist.comment.i)
- IF POS(cmt, dlist.comment.i) > 0 THEN 'SELECT' dlist.name.i
- END
-
-